import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
import { queryParams } from '@/utils/xwCommon'

type orderResult = {
  page: any;
  result: any
};

/** 订单列表 */
export const getOrderList = (data?: object) => {
  return http.request<orderResult>("post", baseUrlApi("/api/backend/order/seluserorderpage"), { data });
};


/** 用户订单状态修改 */
export const changeordertype = (data?: object) => {
  return http.request<orderResult>("post", baseUrlApi("/api/backend/order/changeordertype"), { data });
};

/** 用户订单状态修改 */
export const exportOrder = (data?: object) => {
  // let r = queryParams(query)
  return http.request<orderResult>("post", baseUrlApi(`/api/backend/order/export`), { data, responseType: "blob" });
};